﻿@model dynamic
@{
    ViewBag.Title = "title";
    Layout = "";
}
    

<style>
    .table-hover {
        font-size: 14px!important
    }
</style>
<h2>HahaList</h2>
<script>

    require(["page/Spider/HahaList.js"], function (pager) {
        pager.init();
    });

 
</script>
<div ms-controller="ctrlSpiderHahaList">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">哈哈笑话列表</h3>
                    <span>
                        <select ms-duplex="typeId">
                            <option value="1">haha</option>
                            <option value="2">youmin</option>
                        </select>
                    </span>
                    <span style="margin-left: 300px;">共 {{pageCount}} 页 第 {{pageIndex}} 页</span>

                    <div class="box-tools">
                       
                        <div class="input-group">
                            <input type="button" class="form-control input-sm pull-right" style="width: 150px;" value="Next" ms-click="NextPageClick">

                            <input type="number" min="1" ms-attr-max="pageCount" class="form-control input-sm pull-right" style="width: 150px;" placeholder="Search" ms-duplex="pageIndex">
                        </div>
                    </div>
                </div><!-- /.box-header -->
                <div class="box-body table-responsive no-padding">
                    <table class="table table-hover">
                        <tbody>
                            <tr>
                                <th>ID</th>
                                <th>Flag</th>
                                <th>Url</th>
                                <th>Content</th>
                                <th>Weight</th>
                            </tr>
                            <tr ms-repeat-row="list" ms-click="trClick(row)" ms-class-1="bg-gray-active:row.Url==current.Url">
                                <td> <i class="fa fa-close btn" ms-click="del(row,$remove)"></i>  </td>
                                <td>{{row.Flag}}</td>
                                <td>  <a target="_blank" ms-href="{{row.Url}}">{{row.Url}}</a> </td>
                                <td>
                                    <div style="text-overflow: ellipsis ; overflow: hidden ; white-space: nowrap;width: 800px;">
                                        <i class="fa fa-at" ms-attr-title="row.Content"></i>  {{getContent( row.Content)}}
                                    </div>
                                </td>
                                <td><span class="label " ms-class-1="{{getWeightClass(row.Weight)}}">{{row.Weight}}</span></td>
                            </tr>

                        </tbody>
                    </table>
                </div><!-- /.box-body -->
            </div><!-- /.box -->
        </div>
    </div>
    <div class="row">
        <div class="col-md-8">
            <textarea style="width: 100%;height: 100px;" ms-duplex="current.Content"> </textarea> <br />
            <label title="更新内容">
                更新内容
                <button ms-click="updateClick(current)"> <i class="fa fa-refresh"></i></button>
            </label>
            <button class="btn btn-success btn-lg" ms-click="nextClick(1)">NEXT</button>
           
        </div>
    </div>
    <div ms-if="!IsPartial" class="row">
        {{current.Content|html}}
    </div>
    <div ms-if="IsPartial" class="row">
        <div  class="row" ms-repeat-p="pList">
            {{p|html}}
        </div>
        
        <div ></div>
    </div>
    <div class="row">
        <button class="btn btn-success btn-lg" ms-click="nextClick(2)">NEXT</button>
    </div>

</div>